package com.lcp.entity;

import com.lcp.utils.SignalUtil;
public class Point2D {
    private double x;
    private double y;

    private Point2D(){}

    private Point2D(double x,double y){
        this.x = x;
        this.y = y;
    }


    public static Point2D toInstance(double x,double y){
        return new Point2D(x,y);
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    @Override
    public String toString() {
        return x+SignalUtil.commer+y;
    }
}
